#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<assert.h>
char* my_strncat(char* dest, const char* src, size_t num)
{
	assert(dest && src);
	char* cur = dest;
	while (*dest != '\0')
	{
		dest++;
	}
	while (num--)
	{
		*dest = *src;
		dest++;
		src++;
	}
	return cur;
}
int main()
{
	char arr1[20] = "hello ";
	char arr2[] = "world";
	char* ret = my_strncat(arr1, arr2, 3);
	printf("%s\n", ret);
	return 0;
}